package com.qingge.springboot.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qingge.springboot.entity.Cart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 黎俊
 * @since 2022-06-10
 */
public interface CartMapper extends BaseMapper<Cart> {

    Page<Cart> page(Page<Object> objectPage, Integer userId, String role, String name);
    @Update("update cart set num = #{num} where id= #{id}")
    void updateNum(@Param("num") Integer num,@Param("id") Integer id);
}
